package com.qf.rabbitmqcase.rabbitmq;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 刘欣
 * @createTime 2023/3/3 14:42
 * @description
 */
@Component
public class SengMsg {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void send(String exName, String routingKey, Object obj) {
        rabbitTemplate.convertAndSend(exName, routingKey, obj);
    }
}
